﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PopPostID.aspx.cs" Inherits="PopPostID" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>제목 없음</title>
	<script type="text/javascript">
		function sendValue(s) {
			var param = new Array();
			param = s.value.split('|');
			opener.parent.document.forms[0]["txtPost1"].value = param[0];
			opener.parent.document.forms[0]["txtPost2"].value = param[1];
			opener.parent.document.forms[0]["txtAddress1"].value = param[2];
			self.close();
		}
	</script>
	<link rel="Stylesheet" type="text/css" href="common/all.css" />
	<link type="text/css" href="common/blitzer/jquery-ui-1.8.16.custom.css" rel="Stylesheet" />
	<script type="text/javascript" src="lib/jquery-1.7.min.js"></script>
	<script type="text/javascript" src="lib/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript">
		$j = jQuery.noConflict();
		$j(function() {
			$j("input:submit").button();
		})
	</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
		<table border="0" cellspacing="0" cellpadding="0" width="80%" style="margin-left:auto; margin-right:auto; margin-top:10px;">
			<tr>
				<td style="width:90%;">
					<asp:TextBox id="txtSearchword" runat="server" Class="txtPostSearch" />
				</td>
				<td>
					<asp:Button runat="Server" id="btnSubmit" OnClick="btnSubmit_Clicked" Text="검색" />
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<asp:label id="lblError" runat="server" Visible="false" Font-Size="Large" ForeColor="Red" Font-Bold="true" style="margin-left:30px; height:500px; margin-top:200px;"/>
					<asp:DataList ID="dList" runat="Server" >
						<HeaderTemplate>
							<table>
								<tr>
									<td style="width:20px; text-align:center;">
									</td>
									<td style="width:60px; text-align:center; font-weight:bold;">
										우편번호
									</td>
									<td style="text-align:center; font-weight:bold;">
										주소
									</td>
								</tr>
						</HeaderTemplate>
						<ItemTemplate>
								<tr style="background-color:#EAEEF2;">
									<td style="border:none 0 #EAEEF2; padding:5px 0 5px 0; border-collapse:separate; ">
										<input type="radio" onclick="sendValue(this)" value="<%# PostIdFormat(Eval("postcd").ToString(), "split") + "|" + Eval("address").ToString() %>" />
									</td>
									<td style="border:none 1 #EAEEF2; padding:5px 0 5px 0; border-collapse:separate; ">
										<%# PostIdFormat(Eval("postcd").ToString(), "show") %>	
									</td>
									<td style="border:none 1 #EAEEF2; padding:5px 0 5px 0; border-collapse:separate; ">
										<%# Eval("address") %>
									</td>
								</tr>
						</ItemTemplate>
						<AlternatingItemTemplate>
								<tr>
									<td>
										<input type="radio" onclick="sendValue(this)" value="<%# PostIdFormat(Eval("postcd").ToString(), "split") + "|" + Eval("address").ToString() %>" />
									</td>
									<td>
										<%# PostIdFormat(Eval("postcd").ToString(), "show") %>	
									</td>
									<td>
										<%# Eval("address") %>
									</td>
								</tr>
						</AlternatingItemTemplate>
						<FooterTemplate>
							</table>
						</FooterTemplate>
					</asp:DataList>
				</td>
			</tr>
		</table>
    </div>
    </form>
</body>
</html>
